home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / util / gnu / WinGnuPlot.lha / WinGnuPlot / Source / WinPlot.h < prev   
Encoding:
C/C++ Source or Header  |  1994-02-13  |  2.4 KB  |  107 lines

  1. /*
  2. #define MWDEBUG 1
  3. #include "memwatch.h"
  4. */
  5.  
  6. /* the config file */
  7. #define CONFIG "PROGDIR:WinPlot.cfg"
  8.  
  9. /* types */
  10.  
  11. struct RangeObject
  12. {
  13.  APTR Min, Max, Auto;
  14. };
  15.  
  16. struct LogScaleObject
  17. {
  18.  APTR Base, LogScale;
  19. };
  20.  
  21. struct LabelObject
  22. {
  23.  APTR Label, XOff, YOff;
  24. };
  25.  
  26. /* PlotImageClass */
  27. #define PIG_LastX 0x12340001
  28. #define PIG_LastY 0x12340002
  29.  
  30. extern Class *PlotImgClass;
  31.  
  32. extern struct MUI_Palette_Entry  ColorEntries[];
  33. extern char                     *ColorNames[];
  34. extern struct PlotCommand       *commands;
  35. extern int                       ncommands;
  36.  
  37. /* Commands */
  38. void SendRexxMsg(char *);
  39. void ReplyRexxMsg(void);
  40. void LoadFunc(void);
  41. void SaveFunc(void);
  42. void CDFunc(void);
  43.  
  44. extern struct MsgPort *RexxReplyPort;
  45.  
  46. /* Window */
  47. APTR GetGUI(void);
  48. void WaitRequest(char *);
  49. void Refresh(void);
  50. void Settings(struct SetVar *);
  51. BOOL HandleMUI(ULONG);
  52.  
  53. extern APTR AP_WinPlot, WI_WinPlot;
  54.  
  55. /* WinPlot */
  56. extern struct FileRequester *FileReq;
  57. extern        Class         *PlotImgClass;
  58. extern        BOOL           IsReady;
  59.  
  60. /* Hooks */
  61. extern        char *StyleEntries[];
  62. extern struct Hook  RangeHook, CheckHook, LogScaleHook, ConFontHook, DesFontHook,
  63.                     RexxCommandHook, StringCommandHook, StyleHook, LabelHook, ViewHook,
  64.                     ConVarHook, DesVarHook;
  65.  
  66. /* some a little bit changed private GnuPlot definitions from "plot.h" */
  67. #define MAX_ID_LEN     50    /* max length of an identifier */
  68. #define MAX_NUM_VAR    5    /* Ploting projection of func. of max. five vars. */
  69.  
  70. enum DATA_TYPES
  71. {
  72.  INTGR, CMPLX
  73. };
  74.  
  75. struct cmplx
  76. {
  77.  double real, imag;
  78. };
  79.  
  80. struct value
  81. {
  82.  enum DATA_TYPES type;
  83.  union
  84.   {
  85.    int int_val;
  86.    struct cmplx cmplx_val;
  87.   } v;
  88. };
  89.  
  90. typedef struct udft_entry
  91. {                                /* user-defined function table entry */
  92.     struct udft_entry *next_udf;         /* pointer to next udf in linked list */
  93.     char udf_name[MAX_ID_LEN+1];         /* name of this function entry */
  94.     struct at_type *at;            /* pointer to action table to execute */
  95.     char *definition;             /* definition of function as typed */
  96.     struct value dummy_values[MAX_NUM_VAR];    /* current value of dummy variables */
  97. } udft_entry;
  98.  
  99.  
  100. typedef struct udvt_entry
  101. {                            /* user-defined value table entry */
  102.     struct udvt_entry *next_udv;    /* pointer to next value in linked list */
  103.     char udv_name[MAX_ID_LEN+1];    /* name of this value entry */
  104.     ULONG udv_undef;                /* true if not defined yet */
  105.     struct value udv_value;            /* value it has */
  106. } udvt_entry;
  107.